let wines = document.querySelectorAll('.wine')
console.log(wines);
let winexias = document.querySelectorAll('.winexia')
wines.forEach((item, index) => {

    item.addEventListener('click', function () {
        // wines.forEach(q=>{
        //     q.classList.remove('active')
        // })
        // item.classList.add('active')

        // 点击按钮，显示信息
        let xiongdi = item.nextElementSibling
        if (xiongdi.style.maxHeight) {
            winexias.forEach(i => {
                i.style.maxHeight = null
            })
        } else {
            winexias.forEach(i => {
                i.style.maxHeight = null
            })
            xiongdi.style.maxHeight = xiongdi.scrollHeight + 'px'

        }

    })
})